/*
 * Copyright 2025 The JA-SIG Collaborative. All rights reserved.
 * distributed with this file and available online at
 */
package com.lap.auth.application.module.command;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.Range;

@Data
@Schema(description = "创建项目命令")
public class CreateModuleCmd {

  @NotBlank(message = "{module.routeId.required}")
  @Length(max = 64, message = "{module.routeId.max.length}")
  @Schema(description = "模块路由")
  private String routeId;

  @NotBlank(message = "{module.name.required}")
  @Length(max = 64, message = "{module.name.max.length}")
  @Schema(description = "模块名称")
  private String name;

  @NotNull(message = "{module.type.required}")
  @Range(min = -127, max = 128, message = "{module.type.range}")
  @Schema(description = "模块类型:0-对内,1-对外")
  private Integer type;

  @NotNull(message = "{module.status.required}")
  @Range(min = -127, max = 128, message = "{module.status.range}")
  @Schema(description = "模块状态:0-禁用,1-启用")
  private Integer status;

  @NotNull(message = "{module.version.required}")
  @Range(min = 0, max = 2147483647, message = "{module.version.range}")
  @Schema(description = "数据版本")
  private Integer version;
}
